<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Title</title>
</head>
<body>
<label><span>HunterId：</span><input id="userId" type="text"></label>
<input type="button" id="find" value="查找">

<br>
<br>
<table id="t1" border="1" style="border:1px solid #00aaff;">
    <tr>
        <td>姓名</td>
        <td>年龄</td>
        <td>信息</td>
        <td>操作</td>
    </tr>
</table>
<br>
<br>

<script type="text/javascript" src="lib/jquery-3.4.1.min.js"></script>
<script type="text/javascript">

    $("#find").on("click", () => {
        var hunter = {'hunterId':$("#hunterId").val()};
            $.ajax({
                type: "post",
                contentType:"application/json;charset=utf-8",
                dataType: "json",
                url: "${pageContext.request.contextPath}/requestAction/resetAccount",
                async: true,
                data: JSON.stringify(hunter),
            success : function (hunterRelation) {
                alert(hunterRelation.hunter_name)
            }
        });
    })
</script>

</body>
</html>